- title t('.title')
- help t('.help')

- content_for :actions do
  .bulk-destroy-action.hidden
    = form_tag bulk_destroy_translations_path(current_site, page: params[:page] || 1, filter_by: params[:filter_by], q: params[:q]), method: :delete do
      = hidden_field_tag 'ids', ''
      = button_tag type: 'submit', class: 'btn btn-primary btn-sm', data: { confirm: t('locomotive.messages.confirm') } do
        i.far.fa-trash-alt
        | &nbsp;
        = t('.bulk_destroy')

.row.list-groups
  .nav-container
    ul.nav.nav-tabs role='tablist'
      - %w(all done partially none).each_with_index do |name, index|

        li class="#{'active' if params[:filter_by] == name || (index == 0 && params[:filter_by].blank?)}"
          = link_to t(".filter_by.#{name}"), translations_path(current_site, q: params[:q], filter_by: index == 0 ? '' : name)

.row.list-header
  .col.col-md-6.col-xs-6.text-left
    .search-bar
      = form_tag translations_path(current_site), method: :get do
        .form-group
          = hidden_field_tag :filter_by, params[:filter_by]
          = text_field_tag :q, params[:q], placeholder: t('.search_placeholder'), class: 'form-control'
          i.fa.fa-search.icon

  .col.col-md-6.col-xs-6.text-right
    - unless @translations.empty?
      .checkbox
        = check_box_tag 'all_translations', 1, false, class: 'list-main-checkbox'
        = label_tag 'all_translations', ''

- if @translations.empty?
  br

  .alert.alert-warning
    == t('.no_items')

- else
  #translations-list.row.big-list
    - @translations.each do |translation|
      .item.col-md-12 class=translation_completion_to_class(current_site, translation)
        .status
          span.completion
            i.fa.fa-circle

        .text
          strong= link_to translation.key, edit_translation_path(current_site, translation, translation_nav_params)
          .stamp
            == document_stamp(translation)

        .actions
          .checkbox
            = check_box_tag "item_#{translation._id}", translation._id
            = label_tag "item_#{translation._id}", ''

    .text-center
      = paginate @translations, theme: 'twitter-bootstrap-3', pagination_class: 'pagination-sm'
